package com.baoyouqun.service;

import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baoyouqun.domain.CreateCmd.UserPointsCreateCmd;
import com.baoyouqun.domain.Query.UserPointsQuery;
import com.baoyouqun.domain.UpdateCmd.UserPointsUpdateCmd;
import com.baoyouqun.domain.VO.UserPointsVO;
import com.baoyouqun.entity.UserPoints;

import java.util.List;

public interface UserPointsService extends IService<UserPoints> {

    /**
     * 新增并返回实体
     */
    SingleResponse<UserPointsVO> create(UserPointsCreateCmd cmd);

    Response update(UserPointsUpdateCmd cmd);

    /**
     * 根据ID查询VO
     */
    UserPointsVO selectById(String id);

    /**
     * 分页查询VO
     */
    IPage<UserPointsVO> pageVo(UserPointsQuery query);

    UserPointsVO getByUserId(String userId);

    List<UserPointsVO> listUsersByNameOrPhone(String keyword);
}